<?php

namespace App\Model\Business;

use App\Model\Model;

class BlackIp extends Model
{
    protected ?string $connection = "business";

    protected ?string $table = "black_ip";

    public static function findBlackIp($channel, $ip)
    {
        return self::query()->where("channel", $channel)
            ->where("ip", $ip)
            ->where("is_deleted", 0)
            ->first();
    }
}